package com.endava.first;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ParsingMac {
	public static void main(String args[]) {
		String s = "5C-93-A2-DE-F2-6F 5C-93-A2-DE-F2-6Z 5C-93-A2-DE-F2";
		String pattern = "((\\d{2}|[A-F][A-F]|\\d{1}[A-F]|[A-F]\\d{1})\\-){5}(\\d{2}|[A-F][A-F]|\\d{1}[A-F]|[A-F]\\d{1})";

		Pattern compiledPattern = Pattern.compile(pattern);
		Matcher matcher = compiledPattern.matcher(s);
		while (matcher.find()) {
			System.out.println(matcher.group());
		}
	}

}
